package main

import "fmt"

//切片循环
func main() {
	var arr = [4]int{1, 2, 3, 4}
	var sliceT = arr[:]
	for _, v := range sliceT {
		fmt.Println("index = ", 1, "value = ", v)
	}

	//切片还可以再次切
	var slice2 = sliceT[1:3]
	slice2[1] = 200
	fmt.Println(slice2)

	for _, v := range sliceT {
		fmt.Println("index = ", 1, "value = ", v)
	}
}
